package com.example.demo.service;

import com.example.demo.entity.User;
import com.example.demo.entity.rep.UserRep;
import com.github.pagehelper.Page;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@Service
public interface UserService {
     Boolean register(User user);

     UserRep login(String account, String password);

     UserRep refreshToken(String token);

     Boolean updateUser(User user);

     Boolean deleteUser(int id);

     Page<User> getAll(String username, int pageNum, int pageSize);

     User getUserById(int id);

     User getUserByUsername(String username);
}
